<%@page import="java.util.List"%>
<%@page import="com.charlie.beans.Groups"%>

<%
    Groups group = (Groups) request.getAttribute("group");
    //for checking admin role
    List<String> roles = (List<String>) request.getAttribute("userroles");
%>
<%@include file="/header.jsp"%>

<div class="left_side">
    <jsp:include page="/blocks/conditionalLeftBar.jsp" />
</div>

<div class="right_side">
    <h2 class="content_title" style="font-size: x-large;">Deletion</h2>
    <div class="white_block">
        <%if ((roles != null) && (roles.contains("Admin"))) {%>
        <h2  style="font-size: large; text-align: center;">You can't delete admin</h2>  
        <form action="users">
            <input type="submit" value="Back" name="back"/>
        </form>
        <%}
        else {%>
        <h2  style="font-size: large; text-align: center;">Continue deletion?</h2>   
        <table>
            <tr>
                <td>
                    <%if (group == null) {%>
                    <form action="users">
                        <%} else {
                        %>
                        <form action="groups">
                            <%}%>
                            <input type="submit" value="Cancel" name="cancel"/>
                        </form>
                </td>
                <td>
                    <form method="get">
                        <input type="submit" value="Continue" name="continue"/>
                    </form>
                </td>
            </tr>
        </table>
        <%}%>
    </div>
</div>

<%@include file="/footer.jsp" %>

